Other Classes

The following classes are available globally.

  • The AutoPurgingImageCache in an in-memory image cache used to store images up to a given memory capacity. When the memory capacity is reached, the image cache is sorted by last access date, then the oldest image is continuously purged until the preferred memory usage after purge is met. Each time an image is accessed through the cache, the internal access date of the image is updated.

    See more

    Declaration

    Swift

    public class AutoPurgingImageCache: ImageRequestCache
  • Constructs multipart/form-data for uploads within an HTTP or HTTPS body. There are currently two ways to encode multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset.

    For more information on multipart/form-data in general, please refer to the RFC-2388 and RFC-2045 specs as well and the w3 form documentation.

    See more

    Declaration

    Swift

    open class MultipartFormData
  • The RequestReceipt is an object vended by the ImageDownloader when starting a download request. It can be used to cancel active requests running on the ImageDownloader session. As a general rule, image download requests should be cancelled using the RequestReceipt instead of calling cancel directly on the request itself. The ImageDownloader is optimized to handle duplicate request scenarios as well as pending versus active downloads.

    See more

    Declaration

    Swift

    public class RequestReceipt
  • The ImageDownloader class is responsible for downloading images in parallel on a prioritized queue. Incoming downloads are added to the front or back of the queue depending on the download prioritization. Each downloaded image is cached in the underlying NSURLCache as well as the in-memory image cache that supports image filters. By default, any download request with a cached image equivalent in the image cache will automatically be served the cached image representation. Additional advanced features include supporting multiple image filters and completion handlers for a single request.

    See more

    Declaration

    Swift

    public class ImageDownloader
  • The NetworkReachabilityManager class listens for reachability changes of hosts and addresses for both WWAN and WiFi network interfaces.

    Reachability can be used to determine background information about why a network operation failed, or to retry network requests when a connection is established. It should not be used to prevent a user from initiating a network request, as it’s possible that an initial request may be required to establish reachability.

    See more

    Declaration

    Swift

    open class NetworkReachabilityManager
  • Responsible for sending a request and receiving the response and associated data from the server, as well as managing its underlying URLSessionTask.

    See more

    Declaration

    Swift

    open class Request
  • The task delegate is responsible for handling all delegate callbacks for the underlying task as well as executing all operations attached to the serial operation queue upon task completion.

    See more

    Declaration

    Swift

    open class TaskDelegate: NSObject